using System;
using System.Runtime.Serialization;

namespace SharpObjects.Shared.ApplicationEvents
{
    [Serializable]
    [DataContract] 
    public class ServiceFactoryGetServiceApplicationEvent
    {
        [DataMember]
        public string ServiceId { get; set; }
        [DataMember]
        public string ServiceVersion { get; set; }
        [DataMember]
        public object Service { get; set; }

        public T GetService<T>()
        {
            return (T) this.Service;
        }
    }
}